package device

import (
	"energy-amiot-platform/middleware"

	"github.com/gin-gonic/gin"
)

func Routers(r *gin.Engine) {
	group := r.Group("/device", middleware.AuthToken())
	group.POST("", create)
	//group.POST("batch/create", batchCreate)
	group.GET("", pagingQuery)
	group.DELETE(":did", delete)

	group2 := r.Group("/client/device", middleware.AuthApp, middleware.AuthMasterKey)
	group2.POST("", createForClient)
	group2.POST("batch/create", batchCreate)
	group2.GET("", pagingQueryFormClient)
	group2.DELETE(":did", deleteForClient)
}
